<%@ page import="com.opeace.SchoolClass" %>



<div class="fieldcontain ${hasErrors(bean: schoolClassInstance, field: 'child', 'error')} required">
	<label for="child">
		<g:message code="schoolClass.child.label" default="Child" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="child" name="child.id" from="${com.opeace.Child.list()}" optionKey="id" required="" optionValue="firstName" value="${schoolClassInstance?.child?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: schoolClassInstance, field: 'description', 'error')} ">
	<label for="description">
		<g:message code="schoolClass.description.label" default="Description" />
		
	</label>
	<g:textField name="description" value="${schoolClassInstance?.description}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: schoolClassInstance, field: 'grade', 'error')} required">
	<label for="grade">
		<g:message code="schoolClass.grade.label" default="Grade" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="grade" from="${com.opeace.SchoolClass$Grade?.values()}" keys="${com.opeace.SchoolClass$Grade.values()*.name()}" required="" value="${schoolClassInstance?.grade?.name()}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: schoolClassInstance, field: 'level', 'error')} required">
	<label for="level">
		<g:message code="schoolClass.level.label" default="Level" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="level" required="" value="${fieldValue(bean: schoolClassInstance, field: 'level')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: schoolClassInstance, field: 'name', 'error')} ">
	<label for="name">
		<g:message code="schoolClass.name.label" default="Name" />
		
	</label>
	<g:textField name="name" value="${schoolClassInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: schoolClassInstance, field: 'school', 'error')} required">
	<label for="school">
		<g:message code="schoolClass.school.label" default="School" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="school" name="school.id" from="${com.opeace.School.list()}" optionKey="id" required="" optionValue="name" value="${schoolClassInstance?.school?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: schoolClassInstance, field: 'subject', 'error')} required">
	<label for="subject">
		<g:message code="schoolClass.subject.label" default="Subject" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="subject" from="${com.opeace.SchoolClass$Subject?.values()}" keys="${com.opeace.SchoolClass$Subject.values()*.name()}" required="" value="${schoolClassInstance?.subject?.name()}"/>
</div>

